package com.pan.excep.error;

import com.pan.excep.enume.ErrorCode;

public class ControllerException extends RuntimeException{
    Integer code;

    public ControllerException(ErrorCode errorCode){
        super(errorCode.getMessage());
        this.code = errorCode.getCode();
    }

    public ControllerException(Integer code,String message){
        super(message);
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
